<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="javax.servlet.http.HttpServletRequest" %>
<%@ page import="able.com.util.HMap" %>
<%@ page import="org.apache.commons.collections.MapIterator" %>
<%-- 
    JSP Name : comPopProcess.jsp
    Description : 이벤트 신청  데이타 처리 완료
    author Seung Won
    since 2012. 7. 31.
    version 1.0
    Modification Information
       since          author              description
    ===========    =============    ===========================
    2012. 7. 31.     Seung Won     최초 생성
--%>
<%@ include file="/WEB-INF/jsp/co/us/include/declare.jspf" %>
<%
    HMap rqMap = request.getAttribute("rqInfo") == null ? null : (HMap)request.getAttribute("rqInfo");
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<%@ include file="/WEB-INF/jsp/co/us/include/header.jspf" %>
<script type="text/javaScript" language="javascript">
$(document).ready(function() {
    <c:if test="${prcRslt.prcConf == 'S0' }">     
    	try{
    		
	        if ( parent.opener.parent.document.mainForm != null ){
	            parent.opener.parent.moveListPage();
	            parent.close();
	        } else {
	            parent.opener.moveListPage();
	            parent.close();
	        }
    	}catch(e){

            parent.close();
    	}
        
        
    </c:if>
    <c:if test="${prcRslt.prcConf == 'S1'}">        
        alert("이미 신청된 E-Mail 입니다.");
    </c:if>
    <c:if test="${prcRslt.prcConf == 'S2'}">        
        var win = window.open("","pop", "scrollbars=yes, width=900,height=500");

        $("#mainForm").attr('target','pop');   
        $("#mainForm").attr('action','https://<%=csrHostName%>/${prcRslt.returnUrl}').submit();
    </c:if>
    <c:if test="${prcRslt.prcConf == 'S3'}">        
       alert("메일과 비밀번호 정보가 일치하지 않습니다.");
    </c:if>
});
</script>
</head>
<body>
<form id="mainForm" name="mainForm" method="post">
<%
    if (rqMap != null && !rqMap.isEmpty()) {
        MapIterator map = rqMap.mapIterator();
        while (map.hasNext()) {
            Object key = map.next();
            Object value = map.getValue();
%>
    <input type="hidden" id="<%=key %>" name="<%=key %>" value="<%=value %>" />
<%
        }
    }
%>
</form>
<c:if test="${prcRslt.prcConf != 'S1'}">
<able:message var="processMessage" message="${prcRslt.prcMsg}"/>
</c:if>
</body>
</html>